package com.terren.springcloud.controller;


import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.terren.springcloud.entity.Product;
import com.terren.springcloud.exception.MyException;


@RestController
public class ProductController {
    @RequestMapping(value = "getProduct")
    public String getProduct() {
     Product product = new Product();
        return product.toString();
    }

    @RequestMapping(value = "/home")
    public String home(){
        System.out.println("123111");
        throw new MyException("101","错误");
    }
}
